<!DOCTYPE HTML>

<html lang="en">
<head>

<title>GroupManager (spring-security-docs 5.6.3 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="GroupManager (spring-security-docs 5.6.3 API)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">

<div class="topNav"><a id="navbar.top">

</a>
<div class="skipNav"><a href="GroupManager.html#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">

</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="GroupManager.html#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="GroupManager.html#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">

</a></div>

</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>

<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.springframework.security.provisioning</a></div>
<h2 title="Interface GroupManager" class="title">Interface GroupManager</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="JdbcUserDetailsManager.html" title="class in org.springframework.security.provisioning">JdbcUserDetailsManager</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">GroupManager</span></pre>
<div class="block">Allows management of groups of authorities and their members.
<p>
Typically this will be used to supplement the functionality of a
<a href="UserDetailsManager.html" title="interface in org.springframework.security.provisioning"><code>UserDetailsManager</code></a> in situations where the organization of application granted
authorities into groups is preferred over a straight mapping of users to roles.
<p>
With this scenario, users are allocated to groups and take on the list of authorities
which are assigned to the group, providing more flexible administration options.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">

</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#addGroupAuthority(java.lang.String,org.springframework.security.core.GrantedAuthority)">addGroupAuthority</a></span>&#8203;(java.lang.String&nbsp;groupName,
<a href="../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&nbsp;authority)</code></th>
<td class="colLast">
<div class="block">Assigns a new authority to a group.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#addUserToGroup(java.lang.String,java.lang.String)">addUserToGroup</a></span>&#8203;(java.lang.String&nbsp;username,
java.lang.String&nbsp;group)</code></th>
<td class="colLast">
<div class="block">Makes a user a member of a particular group.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#createGroup(java.lang.String,java.util.List)">createGroup</a></span>&#8203;(java.lang.String&nbsp;groupName,
java.util.List&lt;<a href="../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;&nbsp;authorities)</code></th>
<td class="colLast">
<div class="block">Creates a new group with the specified list of authorities.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#deleteGroup(java.lang.String)">deleteGroup</a></span>&#8203;(java.lang.String&nbsp;groupName)</code></th>
<td class="colLast">
<div class="block">Removes a group, including all members and authorities.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#findAllGroups()">findAllGroups</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the names of all groups that this group manager controls.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#findGroupAuthorities(java.lang.String)">findGroupAuthorities</a></span>&#8203;(java.lang.String&nbsp;groupName)</code></th>
<td class="colLast">
<div class="block">Obtains the list of authorities which are assigned to a group.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#findUsersInGroup(java.lang.String)">findUsersInGroup</a></span>&#8203;(java.lang.String&nbsp;groupName)</code></th>
<td class="colLast">
<div class="block">Locates the users who are members of a group</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#removeGroupAuthority(java.lang.String,org.springframework.security.core.GrantedAuthority)">removeGroupAuthority</a></span>&#8203;(java.lang.String&nbsp;groupName,
<a href="../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&nbsp;authority)</code></th>
<td class="colLast">
<div class="block">Deletes an authority from those assigned to a group</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#removeUserFromGroup(java.lang.String,java.lang.String)">removeUserFromGroup</a></span>&#8203;(java.lang.String&nbsp;username,
java.lang.String&nbsp;groupName)</code></th>
<td class="colLast">
<div class="block">Deletes a user's membership of a group.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GroupManager.html#renameGroup(java.lang.String,java.lang.String)">renameGroup</a></span>&#8203;(java.lang.String&nbsp;oldName,
java.lang.String&nbsp;newName)</code></th>
<td class="colLast">
<div class="block">Changes the name of a group without altering the assigned authorities or members.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">

</a>
<h3>Method Detail</h3>
<a id="findAllGroups()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>findAllGroups</h4>
<pre class="methodSignature">java.util.List&lt;java.lang.String&gt;&nbsp;findAllGroups()</pre>
<div class="block">Returns the names of all groups that this group manager controls.</div>
</li>
</ul>
<a id="findUsersInGroup(java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>findUsersInGroup</h4>
<pre class="methodSignature">java.util.List&lt;java.lang.String&gt;&nbsp;findUsersInGroup&#8203;(java.lang.String&nbsp;groupName)</pre>
<div class="block">Locates the users who are members of a group</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>groupName</code> - the group whose members are required</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the usernames of the group members</dd>
</dl>
</li>
</ul>
<a id="createGroup(java.lang.String,java.util.List)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>createGroup</h4>
<pre class="methodSignature">void&nbsp;createGroup&#8203;(java.lang.String&nbsp;groupName,
                 java.util.List&lt;<a href="../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;&nbsp;authorities)</pre>
<div class="block">Creates a new group with the specified list of authorities.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>groupName</code> - the name for the new group</dd>
<dd><code>authorities</code> - the authorities which are to be allocated to this group.</dd>
</dl>
</li>
</ul>
<a id="deleteGroup(java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteGroup</h4>
<pre class="methodSignature">void&nbsp;deleteGroup&#8203;(java.lang.String&nbsp;groupName)</pre>
<div class="block">Removes a group, including all members and authorities.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>groupName</code> - the group to remove.</dd>
</dl>
</li>
</ul>
<a id="renameGroup(java.lang.String,java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>renameGroup</h4>
<pre class="methodSignature">void&nbsp;renameGroup&#8203;(java.lang.String&nbsp;oldName,
                 java.lang.String&nbsp;newName)</pre>
<div class="block">Changes the name of a group without altering the assigned authorities or members.</div>
</li>
</ul>
<a id="addUserToGroup(java.lang.String,java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>addUserToGroup</h4>
<pre class="methodSignature">void&nbsp;addUserToGroup&#8203;(java.lang.String&nbsp;username,
                    java.lang.String&nbsp;group)</pre>
<div class="block">Makes a user a member of a particular group.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>username</code> - the user to be given membership.</dd>
<dd><code>group</code> - the name of the group to which the user will be added.</dd>
</dl>
</li>
</ul>
<a id="removeUserFromGroup(java.lang.String,java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>removeUserFromGroup</h4>
<pre class="methodSignature">void&nbsp;removeUserFromGroup&#8203;(java.lang.String&nbsp;username,
                         java.lang.String&nbsp;groupName)</pre>
<div class="block">Deletes a user's membership of a group.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>username</code> - the user</dd>
<dd><code>groupName</code> - the group to remove them from</dd>
</dl>
</li>
</ul>
<a id="findGroupAuthorities(java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>findGroupAuthorities</h4>
<pre class="methodSignature">java.util.List&lt;<a href="../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;&nbsp;findGroupAuthorities&#8203;(java.lang.String&nbsp;groupName)</pre>
<div class="block">Obtains the list of authorities which are assigned to a group.</div>
</li>
</ul>
<a id="addGroupAuthority(java.lang.String,org.springframework.security.core.GrantedAuthority)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>addGroupAuthority</h4>
<pre class="methodSignature">void&nbsp;addGroupAuthority&#8203;(java.lang.String&nbsp;groupName,
                       <a href="../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&nbsp;authority)</pre>
<div class="block">Assigns a new authority to a group.</div>
</li>
</ul>
<a id="removeGroupAuthority(java.lang.String,org.springframework.security.core.GrantedAuthority)">

</a>
<ul class="blockListLast">
<li class="blockList">
<h4>removeGroupAuthority</h4>
<pre class="methodSignature">void&nbsp;removeGroupAuthority&#8203;(java.lang.String&nbsp;groupName,
                          <a href="../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&nbsp;authority)</pre>
<div class="block">Deletes an authority from those assigned to a group</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>

<footer role="contentinfo">
<nav role="navigation">

<div class="bottomNav"><a id="navbar.bottom">

</a>
<div class="skipNav"><a href="GroupManager.html#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">

</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="GroupManager.html#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="GroupManager.html#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">

</a></div>

</nav>
</footer>
<script>if (window.parent == window) {(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-2728886-23', 'auto', {'siteSpeedSampleRate': 100});ga('send', 'pageview');}</script><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v652eace1692a40cfa3763df669d7439c1639079717194" integrity="sha512-Gi7xpJR8tSkrpF7aordPZQlW2DLtzUlZcumS8dMQjwDHEnw9I7ZLyiOj/6tZStRBGtGgN6ceN6cMH8z7etPGlw==" data-cf-beacon='{"rayId":"7040d85c1df5980c","token":"bffcb8a918ae4755926f76178bfbd26b","version":"2021.12.0","si":100}' crossorigin="anonymous"></script>
</body>
</html>
